//package com.videohub.videohub;
//
//import android.support.v7.widget.RecyclerView;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.TextView;
//import android.content.Context;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//
//import com.truizlop.sectionedrecyclerview.SectionedRecyclerViewAdapter;
//import com.videohub.videohub.Tab.BestCollectionItemFragment.OnListFragmentInteractionListener;
//import com.videohub.videohub.dummy.DummyContent.DummyItem;
//
//import java.util.List;
//
///**
// * {@link RecyclerView.Adapter} that can display a {@link DummyItem} and makes a call to the
// * specified {@link OnListFragmentInteractionListener}.
// * TODO: Replace the implementation with code for your data type.
// */
//
//
//public class BestCollectionItemRecyclerViewAdapter extends SectionedRecyclerViewAdapter<CountHeaderViewHolder, CountItemViewHolder> {
//
//    private final List<DummyItem> mValues;
//    private final OnListFragmentInteractionListener mListener;
//
//    protected Context context = null;
//
//    public CountSectionAdapter(Context context) {
//        this.context = context;
//    }
//
//    public BestCollectionItemRecyclerViewAdapter(List<DummyItem> items, OnListFragmentInteractionListener listener) {
//        mValues = items;
//        mListener = listener;
//    }
//
//    @Override
//    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
//        View view = LayoutInflater.from(parent.getContext())
//                .inflate(R.layout.fragment_item, parent, false);
//        return new ViewHolder(view);
//    }
//
//    @Override
//    protected int getSectionCount() {
//        return 1;
//    }
//
//    @Override
//    protected int getItemCountForSection(int section) {
//        return 1;
//    }
//
//    @Override
//    protected boolean hasFooterInSection(int section) {
//        return false;
//    }
//
//    @Override
//    protected void onBindSectionFooterViewHolder(RecyclerView.ViewHolder holder, int section) {
//
//    }
//
//    @Override
//    protected void onBindSectionHeaderViewHolder(CountHeaderViewHolder holder, int section) {
//        holder.render("Section " + (section + 1));
//    }
//
//
//    protected int[] colors = new int[]{0xfff44336, 0xff2196f3, 0xff009688, 0xff8bc34a, 0xffff9800};
//    @Override
//    protected void onBindItemViewHolder(CountItemViewHolder holder, int section, int position) {
//        holder.render(String.valueOf(position + 1), colors[section]);
//    }
//
//
////    @Override
////    protected void onBindSectionHeaderViewHolder(RecyclerView.ViewHolder holder, int section) {
////
////    }
//
////    @Override
////    public void onBindViewHolder(final ViewHolder holder, int position) {
////        holder.mItem = mValues.get(position);
////        holder.mIdView.setText(mValues.get(position).id);
////        holder.mContentView.setText(mValues.get(position).content);
////
////        holder.mView.setOnClickListener(new View.OnClickListener() {
////            @Override
////            public void onClick(View v) {
////                if (null != mListener) {
////                    // Notify the active callbacks interface (the activity, if the
////                    // fragment is attached to one) that an item has been selected.
////                    mListener.onListFragmentInteraction(holder.mItem);
////                }
////            }
////        });
////    }
//
//
//    protected LayoutInflater getLayoutInflater(){
//        return LayoutInflater.from(context);
//    }
//
//
//    @Override
//    protected CountHeaderViewHolder onCreateSectionHeaderViewHolder(ViewGroup parent, int viewType) {
//        View view = getLayoutInflater().inflate(R.layout.view_count_header, parent, false);
//        return new CountHeaderViewHolder(view);
//    }
//
//
//    @Override
//    protected CountItemViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType) {
//        View view = getLayoutInflater().inflate(R.layout.view_count_item, parent, false);
//        return new CountItemViewHolder(view);
//    }
//
//
//    @Override
//    public int getItemCount() {
//        return mValues.size();
//    }
//
//    public class ViewHolder extends RecyclerView.ViewHolder {
//        public final View mView;
//        public final TextView mIdView;
//        public final TextView mContentView;
//        public DummyItem mItem;
//
//        public ViewHolder(View view) {
//            super(view);
//            mView = view;
//            mIdView = (TextView) view.findViewById(R.id.item_number);
//            mContentView = (TextView) view.findViewById(R.id.content);
//        }
//
//        @Override
//        public String toString() {
//            return super.toString() + " '" + mContentView.getText() + "'";
//        }
//    }
//}
